Skip to content

fix: Update latency check to use CLAIMED status#680

Merged
evanh merged 4 commits into
mainfrom
evanh/fix/add-claimed-to-latency-check
Jun 8, 2026
Merged

fix: Update latency check to use CLAIMED status#680
evanh merged 4 commits into
mainfrom
evanh/fix/add-claimed-to-latency-check

Conversation

@evanh

@evanh evanh commented Jun 5, 2026

Copy link
Copy Markdown
Member

There was a chance that the latency metric would be very spiky if a message was moving between the PENDING and CLAIMED status. Update the check to use both statuses so the latency stays consistent.

On a related note, update the max message size default. The largest Kafka topic size is currently 50MB, but we actually want a limit slightly higher than that, since for raw taskbrokers we wrap the Kafka message in a few more bytes.

There was a chance that the latency metric would be very spiky if a message was moving between the
PENDING and CLAIMED status. Update the check to use both statuses so the latency stays consistent.
@evanh evanh requested a review from a team as a code owner June 5, 2026 16:55
Comment thread src/store/tests.rs
Comment thread src/config.rs Outdated
max_delayed_task_allowed_sec: 3600,
max_message_size: 5000000,
grpc_max_message_size: 10 * 1024 * 1024, // 10MB
grpc_max_message_size: 12 * 1024 * 1024, // 12MB

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this on purpose?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, updated description.

@untitaker untitaker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a related note, update the max message size default. The default Kafka topic size is 10MB, but we actually want a limit slightly higher than that, since for raw taskbrokers we wrap the Kafka message in a few more bytes.

there is an infra PR that sets it to 50 MB for profiles. i suggest to make 50 MB the default in code and remove any defaults from infra, so we don't have to worry about this anymore. (otherwise we'll have this problem with self-hosted again)

@markstory

Copy link
Copy Markdown
Member

i suggest to make 50 MB the default in code and remove any defaults from infra, so we don't have to worry about this anymore. (otherwise we'll have this problem with self-hosted again)

50MB payloads will be rough on SQLite and postgres because of the write throughput. Should we also be applying compression to the large profile payloads?

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c8d29ff. Configure here.

Comment thread src/config.rs
@untitaker

Copy link
Copy Markdown
Member

Should we also be applying compression to the large profile payloads?

I can follow up on this. fwiw 50 MB is not avg, but max.

@evanh

evanh commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

i suggest to make 50 MB the default in code and remove any defaults from infra, so we don't have to worry about this anymore. (otherwise we'll have this problem with self-hosted again)

50MB payloads will be rough on SQLite and postgres because of the write throughput. Should we also be applying compression to the large profile payloads?

There is already a ticket to introduce that: https://linear.app/getsentry/issue/STREAM-1107/raw-mode-needs-to-compress-the-payload

@evanh evanh merged commit 6cda5fc into main Jun 8, 2026
26 checks passed
@evanh evanh deleted the evanh/fix/add-claimed-to-latency-check branch June 8, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants